cc.Class({
    extends: cc.Component,

    properties: {
        
    },
    reStartBtn: function() {
        cc.director.loadScene('MainScene')
    },
    // LIFE-CYCLE CALLBACKS:

    onLoad : function() {
        cc.director.preloadScene('MainScene')
        // 获取分数
        var scoreNum = cc.sys.localStorage.getItem('score')
        var scoreLabel = cc.find('Home/scoreLabel').getComponent(cc.Label)
        scoreLabel.string = '最终得分: ' + scoreNum
        cc.log(scoreNum, '18')
    },

    start: function() {

    },

    // update (dt) {},
});
